#!/usr/bin/env python
# -*- coding:utf-8 -*-
# @FileName  :requests_session.py
# @Time      :2024/2/25 21:33
# @Author    :Sherlock
import requests


def main():
    url = "https://stock.xueqiu.com/v5/stock/batch/quote.json?symbol=SH000001,SZ399001,SZ399006,SH000688,SH000016,SH000300,BJ899050,HKHSI,HKHSCEI,HKHSTECH,.DJI,.IXIC,.INX"
    headers = {
        "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36"
    }
    session = requests.Session()
    session.headers.update(headers)
    session.get("https://xueqiu.com/")
    response = session.get(url)
    print(response.json())


if __name__ == "__main__":
    main()
